package ar.com.photo_admin.service.assembler

import org.apache.commons.lang.NotImplementedException;

import ar.com.photo_admin.domain.*;
import ar.com.photo_admin.service.dto.PhotoDTO;

class PhotoAssembler extends BaseAssembler {

	def config = org.codehaus.groovy.grails.commons.ConfigurationHolder.config
	def domain = config.app.domain.url
	
	def toBean (photo){
		PhotoDTO bean = new PhotoDTO()
		
		bean.id = photo.id;
		bean.url = photo.getPublishedUrl()
		bean.thumbnailUrl = photo.getPublishedThumbnailUrl()
		
		return bean
	} 
	
	def toLightWeightBean(entity){
		throw new NotImplementedException()
	}
}
